<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerOrderForm.aspx.cs" Inherits="Sample.CustomerOrderForm" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Customer Order</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <table>
        
        <tr>
            <td>Order Name</td>
            <td>:</td>
            <td>
                <% if(GetDisplayType == Sample.CustomerOrderForm.DisplayType.Add) { %>
                <asp:TextBox ID="CustomerOrderOrderNameInput" runat="server" MaxLength="50"></asp:TextBox>
      <asp:RequiredFieldValidator ID="CustomerOrderOrderNameRequiredValidator" runat="server" ErrorMessage="This field is required" ControlToValidate="CustomerOrderOrderNameInput"></asp:RequiredFieldValidator>
                <% } else { %>
                <asp:Label ID="CustomerOrderOrderNameDisplay" runat="server" Text=""></asp:Label>
                <% } %>
            </td>
        </tr>
        
        <tr>
            <td>Customer</td>
            <td>:</td>
            <td>
                <% if(GetDisplayType == Sample.CustomerOrderForm.DisplayType.Add) { %>
                <asp:DropDownList ID="CustomerIdInput" runat="server"></asp:DropDownList>
                <% } else { %>
                <asp:Label ID="CustomerOrderCustomerDisplay" runat="server" Text=""></asp:Label>
                <% } %>
            </td>
        </tr>
        
        <tr>
            <td>Quantity</td>
            <td>:</td>
            <td>
                <% if(GetDisplayType == Sample.CustomerOrderForm.DisplayType.Add) { %>
                <asp:TextBox ID="CustomerOrderQuantityInput" runat="server"></asp:TextBox><asp:RequiredFieldValidator ID="CustomerOrderQuantityRequiredValidator" runat="server" ErrorMessage="This field is required" ControlToValidate="CustomerOrderQuantityInput"></asp:RequiredFieldValidator>
                <% } else { %>
                <asp:Label ID="CustomerOrderQuantityDisplay" runat="server" Text=""></asp:Label>
                <% } %>
            </td>
        </tr>
        
        <tr>
            <td colspan="3">
                <asp:Button ID="CustomerOrderSaveButton" runat="server" Text="Save" OnClick="CustomerOrderSaveButton_Click" />
                <asp:Button ID="CustomerOrderCancelButton" runat="server" Text="Cancel" OnClick="CustomerOrderCancelButton_Click" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>